package com.zealfi.wk.common.util;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Random;

/**
 * Created by kuan at 2018-04-25 下午 2:39
 */
public class Util {
    private static final Logger log = LoggerFactory.getLogger(Util.class);

    public static void sleep() {
        sleep(3000);
    }

    public static void sleep(int bound) {
        int i = new Random().nextInt(bound);
        log.info("sleep time:{}", i);
        try {
            Thread.sleep(i);
        } catch (InterruptedException e) {
            log.error("", e);
        }
    }
}
